﻿using UnityEngine;
using System.Collections;

public static class TransformExtensions
{
	public static Transform GetChildByName(this Transform parent, string name)
    {
		for(int i = 0; i < parent.childCount; i++)
		{
			if(string.Equals(name, parent.GetChild(i).name))
			{
				return parent.GetChild(i);
			}
		}
        return null;
    }
}
